public class FindLongestNameHomework {

	public static void main(String[] args) {

		if (args.length >= 4){
			String names[] = args;
			String name = names[0];
		
			for (int i=1; i<args.length; i++){
				if (name.length() < names[i].length()) name = names[i];
			}
		
			System.out.println("The longest name is: " + name.replace(",", " "));
		}
		
		else System.out.println("Please provide at least 4 arguments in name,surname format.");
	}

}